package com.indusfo.spc.pda.controller;

import com.indusfo.spc.pda.pojo.CallmatDto;
import com.indusfo.spc.pda.service.CallmatDosingDetailService;
import com.indusfo.spc.vo.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @ClassName CallmatDosingDetailController
 * @Description 叫料配送
 * @Author louk
 * @Date 2019/12/20 15:05
 */
@Controller
@RequestMapping("/pda/callmatDosingDetail")
public class CallmatDosingDetailController {
    @Resource
    CallmatDosingDetailService callmatDosingDetailService;


    /**
     * 新增叫料明细
     * @return
     */
    @RequestMapping("insertCallmatDosingDetail")
    @ResponseBody
    public JSONObject insertCallmatDosingDetail(CallmatDto callmatDto){
        return  callmatDosingDetailService.insertCallmatDosingDetail(callmatDto);

    }

    /**
     * 扫描条码来获取到物料编号,物料名称
     * @param matNo
     * @return
     */
    @RequestMapping("queryDosingCallmat")
    @ResponseBody
    public JSONObject queryDosingCallmat(String matNo){

        return callmatDosingDetailService.queryDosingCallmat(matNo);
    }

}
